// import request from '/@/router/axios'
import request from "/@/utils/request"

export function getModelList(params) {
  return request({
    url: '/bum/devEnroll/page',
    method: 'get',
    params
  })
}
//新增
export function addModelList(params) {
  return request({
    url: '/bum/devEnroll',
    method: 'post',
    data: params
  })
}
export function editModelList(params) {
  return request({
    url: '/bum/devEnroll',
    method: 'put',
    data: params
  })
}
//删除
export function delModelList(ids) {
  return request({
    url: `/bum/devEnroll/${ids}`,
    method: 'delete',
  })
}

//获取所有的类型
export function getAllAssetsType(obj) {
  return request({
    url: '/bm/bamaassetstype/getAssetsTypeBy',
    method: 'post',
    data: obj
  })
}
//获取栏目树
export function getAssetsCloumTree() {
  return request({
    url: '/bm/bamaassetscloumn/tree?lazy=false&parentId=00',
    method: 'get'
  })
}
export function getAllAssetsModel(obj) {
  return request({
    // url: '/bm/bamaassetsmodel/getAssetsModelBy',
    url: '/admin/accessDevice/page',
    method: 'post',
    data: obj
  })
}

// 获取  产品
export function getDevInfo(params) {
  return request({
    // url: '/em/deviceonlineinfo/page',
    // url: '/admin/accessDevice/page',
    url: '/admin/accessProduct/page',
    method: 'get',
    params
  })
}
// 设备列表
export function getProduct(params) {
  return request({
    url: '/admin/accessDevice/list',
    method: 'get',
    params
  })
}
export function getzhuceProduct(params){
  return request({
    url: '/admin/devEnroll/page',
    method: 'get',
    params
    
  })
}


//
// 配电室 api
// 配电室 列表
export function getSwitchRoomList(params) {
  return request({
    url: '/bum/switchRoom/page',
    method: 'get',
    params
  })
}
// 配电室  新增
export function addSwitchRoom(params) {
  return request({
    url: '/bum/switchRoom',
    method: 'post',
    data: params
  })
}
// 配电室  修改
export function editSwitchRoom(params) {
  return request({
    url: '/bum/switchRoom',
    method: 'put',
    data: params
  })
}
// 配电室 删除
export function delSwitchRoom(ids) {
  return request({
    url: '/bum/switchRoom',
    method: 'delete',
    data: ids
  })
}

// 配电室和设备映射 api
// 配电室和设备映射 列表
export function getSwitchRoomAndDevList(params) {
  return request({
    url: '/bum/switchRoomAndDev/page',
    method: 'get',
    params
  })
}
// 配电室和设备映射  新增
export function addSwitchRoomAndDev(params) {
  return request({
    url: '/bum/switchRoomAndDev',
    method: 'post',
    data: params
  })
}
// 配电室和设备映射  修改
export function editSwitchRoomAndDev(params) {
  return request({
    url: '/bum/switchRoomAndDev',
    method: 'put',
    data: params
  })
}
// 配电室和设备映射 删除
export function delSwitchRoomAndDev(id) {
  return request({
    url: '/bum/switchRoomAndDev/' + id,
    method: 'delete'
  })
}

// 配电室和支路映射表 api
// 配电室和支路映射表 列表
export function getSwitchRoomAndLoopList(params) {
  return request({
    url: '/bum/switchRoomAndLoop/page',
    method: 'get',
    params
  })
}
// 配电室和支路映射表  新增
export function addSwitchRoomAndLoop(params) {
  return request({
    url: '/bum/switchRoomAndLoop',
    method: 'post',
    data: params
  })
}
// 配电室和支路映射表  修改
export function editSwitchRoomAndLoop(params) {
  return request({
    url: '/bum/switchRoomAndLoop',
    method: 'put',
    data: params
  })
}
// 配电室和支路映射表 删除
export function delSwitchRoomAndLoop(id) {
  return request({
    url: '/bum/switchRoomAndLoop/' + id,
    method: 'delete'
  })
}

// 配电柜和支路映射表 api
// 配电柜和支路映射表 列表
export function getCabinetsList(params) {
  return request({
    url: '/bum/cabinets/page',
    method: 'get',
    params
  })
}
// 配电柜和支路映射表  新增
export function addCabinets(params) {
  return request({
    url: '/bum/cabinets',
    method: 'post',
    data: params
  })
}
// 配电柜和支路映射表  修改
export function editCabinets(params) {
  return request({
    url: '/bum/cabinets',
    method: 'put',
    data: params
  })
}
// 配电柜和支路映射表 删除
export function delCabinets(id) {
  return request({
    url: '/bum/cabinets/' + id,
    method: 'delete'
  })
}
// 配电柜下拉列表 接口
export function prsdcontainerList(query) {
  return request({
    url: '/bum/prsdcontainer/page',
    method: 'get',
    params: query
  })
}
